<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title>Cadastro de Grupo</title>
	<link rel="stylesheet" type="text/css" href="stl/style.css"></link>
</h:head>

<h:body>
	<h:outputLabel />
	<h2 style="text-align: center">Cadastro de Contato</h2>
	<h:form style="text-align: center">
		<h:outputLabel value="Nome: " />
		<h:inputText value="#{contatoBean.nome}" required="true"
			requiredMessage="Digite o nome." />
		<br />
		<h:outputLabel value="Sobrenome: " />
		<h:inputText value="#{contatoBean.sobrenome}" required="true"
			requiredMessage="Digite o sobrenome." />
		<br />
		<h:outputLabel value="E-mail: " />
		<h:inputText value="#{contatoBean.email}" required="true"
			requiredMessage="Digite o email." />
		<br />
		<h:outputLabel value="Data de Nascimento: " />
		<h:inputText value="#{contatoBean.dataNascimento}" required="true"
			requiredMessage="Digite a data de nascimento.">
			<f:convertDateTime pattern="dd/MM/yyyy" />
			</h:inputText>
		<br />
		<h:outputLabel value="Telefone Residencial: " />
		<h:inputText value="#{contatoBean.telefoneCasa}" />
		<br />
		<h:outputLabel value="Telefone Comercial: " />
		<h:inputText value="#{contatoBean.telefoneComercial}"/>
		<br />
		<h:outputLabel value="Telefone Celular: " />
		<h:inputText value="#{contatoBean.telefoneCelular}" />
		<br />
		<h:outputLabel value="Lougradouro: " />
		<h:inputText value="#{contatoBean.logradouro}" required="true"
			requiredMessage="Digite o Lougradouro." />

		<h:outputLabel value="Número: " />
		<h:inputText value="#{contatoBean.numero}" required="true"
			requiredMessage="Digite o Número." />
		<br />
		
		<h:outputLabel value="Complemento: " />
		<h:inputText value="#{contatoBean.complemento}" />
		<br />
		
		<h:outputLabel value="Bairro: " />
		<h:inputText value="#{contatoBean.bairro}" required="true"
			requiredMessage="Digite o Bairro." />
		<br />
		
		<h:outputLabel value="Cidade: " />
		<h:inputText value="#{contatoBean.cidade}" required="true"
			requiredMessage="Digite a cidade." />
		<br />
		
		<h:outputLabel value="Estado: " />
		<h:inputText value="#{contatoBean.estado}" required="true"
			requiredMessage="Digite o Estado." />
		<br />
		
		<h:outputLabel value="Pais: " />
		<h:inputText value="#{contatoBean.pais}" required="true"
			requiredMessage="Digite o pais." />
		<br />

		<h:outputLabel value="Escolha o grupo: " />
		<h:selectOneMenu style=" width : 150px;" id="grupo"
			value="#{contatoBean.grupoId}"  required="true"
			requiredMessage="Escolha o grupo">
			<f:selectItems value="#{contatoBean.grupos}" />
		</h:selectOneMenu>
		<br />


		<h:commandButton action="#{contatoBean.adicionaContato}"
			value="Salvar" />
		<br></br>
		<a href="../index.xhtml" style="text-align: center">Voltar ...</a>
	</h:form>
</h:body>
</html>